import request from '@/utils/request'
import type {SearchEmpModel , ResultModel, EmpModel } from '@/api/model/model'
// 查询员工列表
export const queryEmpList = (name:string,gender:string,begin:string,end:string,page:number,pageSize:number)=>request.get<any, ResultModel>
(`/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`);
//员工新增
export const addEmp = (emp:EmpModel)=>request.post<any, ResultModel>("/emps", emp);
//数据回显
export const getEmpById = (id:number)=>request.get(`/emps/${id}`);
//修改员工
export const updateEmp =  (emp:EmpModel)=>request.put<any, ResultModel>("/emps", emp);
//单条删除
export const deleteEmpByIds = (ids:string)=>request.delete(`/emps?ids=${ids}`);
